Django | Background for html page.

by: SarefMet, 9 years ago

Last edited: 9 years ago

First I want to say thank you for wonderful lessons. Your tutorials are one of the best ways to start learn Python. At least for me.

I want to add background for body tag and change font's color.
Something like this:
<pre class='prettyprint lang-py'>
<body style="background: {% static 'static/music_group_app/images/background.jpg' %}; background-size: 100%; color: #9d9d9d; min-height: 100%">
</pre>

But this don't work. And it's probably not the best solution.
How can I fix it?

Dirs:

music_group_app
||
templates/music_group_app/index.html
||
static/music_group_app/images/background.jpg



You must be logged in to post. Please login or register an account.



Oh, I forgot about url()
<body style="background: url({% static 'music_group_app/images/background.jpg' %}); background-size: 100%; color: #9d9d9d; min-height: 100%">

Sorry x)

-SarefMet 9 years ago
Last edited 9 years ago

You must be logged in to post. Please login or register an account.


Glad you got it all sorted out!

-Harrison 9 years ago

You must be logged in to post. Please login or register an account.